import request from '@/utils/request'

export const listTemplate= (search) => 
    request({
        url: '/template',
        method: 'get',
        params: {
            pageNum: search.pageNum,
            pageSize:search.pageSize,
            queryString:search.queryString
        }
    }) 

export const removeTemplate= (id) => 
    request({
        url: '/template/' + id,
        method: 'delete'
    })

export const updatetemplate = (id, template) =>
    request({
        url: '/template/' + id,
        method: 'put',
        data: template
    })

export const saveTemplate= (template) => 
    request({
        url: '/template',
        method: 'post',
        data: template
    })
export const uptemplate = (id) =>
    request({
        url: '/template/' + id,
        method: 'get'
    })